[WHIT-3170] Override social media display text#11486
Open
lauraghiorghisor-tw wants to merge 3 commits into
Open
[WHIT-3170] Override social media display text#11486lauraghiorghisor-tw wants to merge 3 commits into
lauraghiorghisor-tw wants to merge 3 commits into
Conversation
21f7fdd to
d55b92a
Compare
This title is primarily intended to be used for the "Other" service type. We need to be able to distinguish between the various channels. Nonetheless, the title input can also be used to provide multiple instances of any other channel type. Future commit will add the necessary validations.
- We now validate for unique title as well (URL must also be unique from before). - Channel names can now be repeated, provided their titles are distinct. - The "Other" channel does not behave in any way differently from the rest of the channels. We won't allow multiple "Other" entries unless they have different titles. A valid scenario is if one "Other" channel has no title and the other does. - We do not validate title uniqueness scoped to the channel, but globally - we will not allow a repeated title even if it is across different channels. This is because it could still be confusing on the screen if the title is repeated. - If there are channels that match, and their titles match, we'll only render a single error for the titles matching.
d55b92a to
c868311
Compare
The social media accounts were originally named social media links. We have changed the labels of the block field, but the model attribute is still named `social_media_links`, so the default errors are added to it, and rendered as such. This creates a broken user experience. This commit adds a locale override for the attribute, to match the labels rendered on the form. We could have just changed the json config to change the attribute, but we now have live data using `social_media_links`, so that's no longer possible.
c868311 to
52c9773
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Added a new optional title field to social media links. This title is primarily intended to be used for the "Other" service type. We need to be able to distinguish between the various channels. Nonetheless, the title input can also be used to provide multiple instances of any other channel type.
Validation changes:
Generally followed approach in previous PR, except for setting required on the schema - feels unnecessary since the validation for this is custom.
Also added a locale override for the error label. The previous code rendered the old model-attribute-based label in the error summary, which no longer matches what we show on the form, creating a confusing experience for the user. We could have just changed the json config to change the attribute, but we now have live data using
social_media_links, so that's no longer possible.Testing
Jira